home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Programming / ace_gpl_release / src_ansi / ace / c / structs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-05  |  2.7 KB  |  88 lines

  1. #define    MAXIDSIZE     42           /* max length of identifier (+ qualifier) */
  2. #define    MAXPARAMS     40           /* max # of subprogram parameters */
  3. #define    NUMACELIBS     7       /* # of shared libraries used by ACE */
  4. #define    NUMLIBS          40       /* max # of "other" shared libraries */
  5.  
  6. /* --symbol table-- */
  7. typedef union conststruct {
  8.                SHORT shortnum;    
  9.                LONG  longnum;
  10.                float singlenum;
  11.               } CONST;
  12.  
  13. typedef struct structmem {
  14.               char  name[MAXIDSIZE];
  15.               int   type;
  16.               ULONG offset;
  17.               ULONG strsize;
  18.               struct structmem *next;
  19.              } STRUCM;
  20.   
  21. typedef struct symstruct {
  22.               char   *name;              /* name of identifier */
  23.               int    type;               /* type (short,long...) */
  24.               int    object;             /* variable,sub... */
  25.               int    dims;               /* # of array elements */
  26.               BOOL   shared;         /* is object shared? */
  27.               BOOL   new_string_var;     /* new string variable? */
  28.               SHORT  *index;              /* array indices */
  29.               SHORT     no_of_params;       /* # of SUB parameters */
  30.               int     p_type[MAXPARAMS];  /* SUB parameter types */
  31.               UBYTE  decl;             /* forward reference? */
  32.               UBYTE  *reg;                  /* lib function regs */
  33.               char   *libname;         /* library name */
  34.               CONST  numconst;         /* a numeric constant */
  35.               STRUCM *structmem;         /* structdef list ptr */
  36.               long    address;            /* frame/library offset */
  37.               ULONG  size;             /* # of bytes in object */
  38.               int    level;              /* main or sub program */
  39.               struct symstruct *other;   /* for cross-reference */
  40.               struct symstruct *next;    /* next table entry */
  41.                  } SYM;
  42.  
  43.  
  44. /* --data list-- */
  45. typedef struct datalist {
  46.              char *name;            /* name of storage */
  47.              char *literal;         /* data */
  48.              struct datalist *next;
  49.             } DATA;
  50.  
  51. /* --bss list-- */
  52. typedef struct bsslist {
  53.              char *name;            /* name of storage */
  54.              char *store;       /* storage type & size */
  55.              struct bsslist *next;
  56.                } BSS;
  57.  
  58. /* --XREF list-- */
  59. typedef struct xreflist {
  60.              char *name;           /* name of external reference */
  61.              struct xreflist *next;
  62.             } XREF;
  63.  
  64. /* --BASIC DATA list-- */
  65. typedef struct basicdatalist {
  66.              char *literal; /* string or float constant */
  67.              struct basicdatalist *next;
  68.             } BASDATA;
  69.  
  70. /* --ACE library usage information-- */
  71. typedef struct ACELIBS {
  72.                char name[MAXIDSIZE];   /* library name */
  73.                char base[MAXIDSIZE+5]; /* library base: _NAMEBase */
  74.               };
  75.  
  76.          struct ACELIBS acelib[NUMACELIBS];
  77.          struct ACELIBS otherlib[NUMLIBS];
  78.  
  79.  
  80. /* --code list-- */
  81. typedef struct codelist {
  82.              char *opcode;          /* 68000 opcode */ 
  83.              char *srcopr;          /* source operand */
  84.              char *destopr;         /* destination operand */
  85.              struct codelist *next;
  86.             } CODE;
  87.  
  88.